Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use --write-sql to save the migration execution log to file #979

Merged
merged 1 commit into from
May 23, 2020

Conversation

goetas
Copy link
Member

@goetas goetas commented May 23, 2020

Q A
Type improvement
BC Break -
Fixed issues -

Summary

In the 2.x version, passing --write-sql implied --dry-run.
This PR decouples the two, so is possible to run:

  • --dry-run without writing the result to file
  • --dry-run and --write-sql
  • --write-sql to have a "log" of executed queries

@goetas goetas added this to the 3.0.0 milestone May 23, 2020
@goetas goetas requested a review from greg0ire May 23, 2020 05:22
@greg0ire
Copy link
Member

greg0ire commented May 23, 2020

The fact you didn't touch composer.* makes the Travis failure a bit concerning :/ I retried the failing job BTW

@goetas
Copy link
Member Author

goetas commented May 23, 2020

I think that is more a travis issue rather than php

@goetas goetas force-pushed the write-path branch 2 times, most recently from 9ea43ec to a051421 Compare May 23, 2020 08:00
@greg0ire
Copy link
Member

greg0ire commented May 23, 2020

I noticed that the phpunit output was very slow, and also, XDebug seems to be disabled in a non standard way:

- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"

@greg0ire
Copy link
Member

@greg0ire
Copy link
Member

Anyway I think you are right, because there definitely was output before it displayed "No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself."

@goetas
Copy link
Member Author

goetas commented May 23, 2020

Found the issue. It was waiting for user input (when running migrations it ask to confirm before proceeding). It seems that recent symfony console detects that the terminal is not interactive. I have updated the test.

@goetas goetas merged commit 42f7c90 into doctrine:master May 23, 2020
@greg0ire
Copy link
Member

Ah nice! That was tricky!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants